<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="姚德秋">
    <title></title>
    <style>
        nav {
            width: 100%;
            background-color: lightgray;
        }

        div {
            width: 900px;
            height: 50px;
            margin: 0 auto;
            background-color: lightcoral;
            display: flex;
            justify-content: space-around;
            line-height: 50px;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
            position: relative;
        }

        ul>a {
            color: whitesmoke;
            font-size: 25px;
            text-decoration: none;
        }

        ul>section {
            position: absolute;
            border: 1px solid black;
            display: none;
            top: 49px;
        }

        section>li>a {
            font-size: 20px;
            color: black;
            text-decoration: none;
        }
    </style>
</head>

<body>
    <nav>
        <div>
            <ul><a href="#">公司简介</a>
                <section>
                    <li><a href="#">概况介绍</a></li>
                    <li><a href="#">发展历史</a></li>
                    <li><a href="#">公司实力</a></li>
                </section>
            </ul>
            <ul><a href="#">产品介绍</a>
                <section>
                    <li><a href="#">软件研发</a></li>
                    <li><a href="#">软件教育</a></li>
                    <li><a href="#">天使投资</a></li>
                </section>
            </ul>
            <ul><a href="#">联系我们</a>
                <section>
                    <li><a href="#">公司地址</a></li>
                    <li><a href="#">联系方式</a></li>
                    <li><a href="#">投资加盟</a></li>
                </section>
            </ul>
            <ul><a href="#">人才招聘</a>
                <section>
                    <li><a href="#">java招聘</a></li>
                    <li><a href="#">html5招聘</a></li>
                    <li><a href="#">php招聘</a></li>
                </section>
            </ul>
        </div>
    </nav>
    <script src="./jquery.js"></script>
</body>

</html>
<script>
    $('ul').each(function (index) {
        $('ul').hover(function () {
            $(this).children('a').css({ 'color': 'red', 'text-decoration': 'underline' });
            $(this).children('section').css('display', 'block');
        }, function () {
            $(this).children('section').css('display', 'none');
            $(this).children('a').css({ 'color': 'whitesmoke', 'text-decoration': 'none' });
        })
    })
    $('li').each(function () {
        $('li').hover(function () {
            $(this).children().css('text-decoration', 'underline');
            $('ul').children('a').css({ 'color': 'whitesmoke', 'text-decoration': 'none' });
        }, function () {
            $(this).children().css('text-decoration', 'none');
        })
    })

</script>